import junit.framework.TestCase;
import org.junit.Test;

import static org.junit.Assert.*;

public class ComplexTest extends TestCase {
    @Test
    public void testAdd(){
        Complex testa = new Complex(1, 2);
        Complex testb = new Complex(3, 5);
        Complex testc;
        testc = testa.Add(testb);
        assertEquals("4.0+7.0i",testc.toString());
    }
    @Test
    public void testMinus(){
        Complex testa = new Complex(1, 2);
        Complex testb = new Complex(6, 5);
        Complex testc;
        testc = testa.Minus(testb);
        assertEquals("-5.0-3.0i",testc.toString());
    }
    @Test
    public void testMulti(){
        Complex testa = new Complex(1, 2);
        Complex testb = new Complex(4, 8);
        Complex testc;
        testc = testa.Multi(testb);
        assertEquals("-12.0+16.0i",testc.toString());
    }
}